home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Resident 2
/
Resident - Issue 2 (19xx)(Angelica - SHI).adf
/
Data
/
039
< prev
next >
Wrap
Text File
|
1993-04-19
|
8KB
|
230 lines
same routine, the subroutine carefully
guards its pre-interrupt data.
¶2 In addition to learning computer
languages and computer architecture,
the student can be expected to study
operating systems. Even here the
¶368000 ¶2has some interesting attributes
that make it particulary suitable as a
teaching machine. For example, all
members of the ¶368000 ¶2family support a
dual operating mode, not found on the
8086 family. The ¶368000 ¶2can operate in
a supervisor mode or a user mode.
When it is in supervisor mode it runs
the operating system and controls all
interrupts and exceptions (software
interrupts). When it is in user mode
it runs programs - applications under
control of the operating system. This
apparent schizophrenia serves a useful
purpose: the operating system has a
higher state of privilege than the
user state and users can be prevented
from carrying out operations that
would compromise the integrity of the
system.
¶1 After the program counter, a
computer's most important register is
its stack pointer that keeps track of
subroutine return addresses.
Corrupting the stack pointer by
careless programming or by faulty
software will crash all the systems.
The ¶368000 ¶1actually has two stack
pointers, one for the operating system
and one for all user applications.
Whatever a user does, the operating
system's own stack pointer cannot be
accessed by the user. Therefore, if
the user crashes an application, the
operating system can step in and
gracefully recover (Now THAT should
someone have told to the programmers
of the Amiga OS. Dotten's anm.) [I
think they already know. Cray's anm.]
¶2 One of the things I emphasize is the
design of robust systems. Whenever
you're beginning to think you must be
paranoiac, just remember that the
world is really out to get you. If
you design mp system you should try to
make it robust and able to handle
life's little problems. Once more,
the ¶368000 ¶2has facilities that enable
it to recover from a wide range of
errors. Consider this example. In
the early days of the 8-bit mp,
programmers had great fun trying out
what they called 'undocumented
op-codes'. Not all possible binary
codes were allocated to the
instructions documentated in a mp's
data sheet. Programmers tried
executing these undefined op-codes and
occasionally they found one that did
something useful.
¶1 I have nothing against experi-
mentation, but a few programmers
actually started using undocumentated
in their programs. If you think for a
moment, a manufacturer is unlikely to
provide useful instructions and not
tell the user. These instructions may
not always work. For example, they
may fail if preceded by certain other
instructions. The manufacturer might
change the design of the chip and the
undocumentated instructions may stop
working.
¶2 The ¶368000 ¶2checks each instruction as
it is executed. If an op-code is not
valid, it immediately jumps into
supervisor mode (if it wasn't already
there) and calls upon the operating
system to deal with the problem.
Illegal instructions are usually
encountered when a processor makes a
jump to a region of memory containig
data rather than instructions.
Besides its ability to deal with
illegal instructions, the ¶368000 ¶2can
recover from problems that would cause
many other processors to crash
terminally. Error recovery mechanisms
exists to deal with division by zero,
attempts to read faulty or
non-existent memory, and spurious
interrupts.
¶1 So far we have talked about the
software or architecture of the
processor. I also teach the design of
mp systems. Once again, the ¶368000
¶1makes a good vehicle for teaching mp
interfacing techniques. When teaching
bus protocols, I use the ¶368000¶1's
asynchronous bus cycle as an example.
The ¶368000 ¶1tells memory that it wants
data and then patiently waits until
the memory provides it. Should the
memory not deliver data whitin a
reasonable time you can apply a pulse
to a special pin to kick it out of its
waiting state and force it to take
action. This takes us back to the
question of robustness.
¶3Development
¶2 Up to now I have talked only about
the ¶368000¶2. Since Intel and Motorola
have access to the same basic
technologies, it is reasonable to
expect that development in these to
companies take place in paralell.
Over the years Intel produced the
8086, 80286, 80386 and 80486 (he
forgot the 80186, no real wonder since
it have never been used in any
IBM-compitable computers. Dotten's
anm.) and Motorola produced the ¶368000¶2,
¶368020¶2, ¶368030 ¶2and ¶368040 ¶2(he forgot the
68010 but that is really just a ¶368000¶2.
Dotten's anm.) You might be surprised
that I don't concentrate heavily on
these much more advanced devices, as
the basic ¶368000 ¶2illustrates much of
what I aim to teach. I will briefly
describe the way in which these
processors have been developed.
¶1The ¶368020 ¶1is a super-¶368000 ¶1with full
32-bit address and data buses.
Improvements in both its internal
organization and design make it much
faster than ¶368000¶1. As far as the
applications programmer is concerned,
the ¶368020 ¶1has the same registers as
the ¶368000¶1. It has a few new in-
structions to handle complex data
structures. Its most significant
feature is its ability to handle bit
fields. Unlike other processors the
¶368020 ¶1can move groups of between 1 and
32 bit bits from place irrespective of
normal 8-bit boundaries. This feature
makes it suitable for image processing
(probably why it is in so many
post-script printers Dotten's anm.) or
for the handling of data structures on
disks.
¶2 Time may prove me wrong, but I
regard the ¶368020 ¶2as the high point of
mp development. Many current
developments in mp technology, such as
RISC, seem to aimed at increasing
speed or adding operating system
facilities. For example, ¶368030 ¶2is
virtually the same the same as the
¶368020 ¶2plus a sophisticated management
system. This enhancement doesn't
speed up the processor's performance
or provide the programmer with any
useful facilities. Rather it permits
the use of operating systems like
Unix, enables you to have virtual
memory facilities and to run programs
simultanously with each program
protected from corruption by other
programs (The 386 have an equivalent
way of operate, altough not used by
MS/DR DOS, has allowed for the
development of OS/2 and Windows NT,
which are both multi-tasking like
Amiga-DOS. Dotten's anm.)
¶1 When I teach memory systems design,
I cover cache memory. A cache is
nothing more than a copy of recently
accessed data which is kept in a small
but fast (static ram, 'bout 10 ns, you
get them external as well. Dotten's
anm.) When the processor requests data
from memory, it is probable that it
will find it in the fast cache memory
rather than the slower external
memory. Both the ¶368020 ¶1and ¶368030 have
on-chip caches - the ¶368020 ¶1caches
instructions and the ¶368030 ¶1caches both
instructions and data. (The 486 also
have an onboard cache. Dotten's anm.)
These are quite small caches but they
enable me to teach the basic
principles.
¶2 The ¶368040 ¶2represents a major
departure from the ¶368000 ¶2family. It
has a larger on board cache. Than the
¶368030 ¶2and and two MMU's (memory
management units), one for accesses to
data and one for accesses to
instructions so it can read an
instruction and data simoultanously.
It also has an on-chip floating point
co-processor.
¶1 I use the computer as an aid to
teaching and not as an end in itself.
Consequently, I shall continue to
build my courses around the 68000
family. My only regret is that IBM
didn't make the same decision a few
years ago....